<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%
String path = request.getContextPath();
String basePath=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<head>
<base href="<%=basePath%>"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>显示所有用户</title>
<style type="text/css">
	  .layui-table td{
	      height: 60px;
	  }
	  .layui-table td img{
	      width:50px;
	      height: 40px;
	  }
	  #unameLikeLi{
   		pointer-events:none; 
 	 }
</style>
<jsp:include page="/WEB-INF/jsp/public/meta.jsp"></jsp:include>
<jsp:include page="/WEB-INF/jsp/public/taglib.jsp"></jsp:include>
</head>
<body>
	<h1 align="center">用户管理页面</h1>
	
	<!-- 刷新 -->
    <div class="layui-btn-group listTable">
		<button class="layui-btn layui-btn-warm" id="flush"><i class="layui-icon">&#xe669;</i>刷新</button>
	</div>
	
	<!-- 批量删除 -->
	<div class="layui-btn-group listTable" style="margin-right: 10px;">  
	  <button class="layui-btn layui-btn-danger" id="delManyUser"><i class="layui-icon">&#xe640;</i>批量删除</button>
	</div>
	
	<!-- 修改用户的form表单 -->
	<div id="updUserDiv" style="display: none; margin-bottom:20px;margin-top: 10px;" align="center">
		<div id="UserHeadImgDiv" align="center">
			<img alt="封面图" src="/zzbinUser/headIf.jpg" class="layui-circle" width="100px;" height="100px;" id="demo1">
			<input type="file" id="test1" name="avater"/>
		</div>
		
		<form action="" class="layui-form" id="updUserForm">
		<input type="hidden" id="userHeadImgInput" name="avater" value="headIf.jpg">
		<div class="layui-form-item" style="margin-top: 10px;">
			<div class="layui-inline">
		      <label class="layui-form-label">姓名</label>
		      <div class="layui-input-inline">
		        <input type="text" name="uname" id="uname" lay-verify="required" autocomplete="off" class="layui-input">
		      </div>
		    </div>
		    
		    <div class="layui-inline">
		      <label class="layui-form-label">用户名</label>
		      <div class="layui-input-inline">
		        <input type="text" name="userName" id="userName" lay-verify="required" autocomplete="off" class="layui-input">
		      </div>
		    </div>
		    
		    <div class="layui-inline">
		      <label class="layui-form-label">密码</label>
		      <div class="layui-input-inline">
		        <input type="text" name="pwd" id="pwd" lay-verify="required" autocomplete="off" class="layui-input">
		      </div>
		    </div>
		    
		    <div class="layui-inline">
		      <label class="layui-form-label">年龄</label>
		      <div class="layui-input-inline">
		        <input type="text" name="age" id="age" lay-verify="required" autocomplete="off" class="layui-input">
		      </div>
		    </div>
		    
		    <div class="layui-inline">
		      <label class="layui-form-label">邮箱</label>
		      <div class="layui-input-inline">
		        <input type="text" name="email" id="email" lay-verify="required|email" autocomplete="off" class="layui-input">
		      </div>
		    </div>
		    
		    <div class="layui-inline">
			    <label class="layui-form-label">性别</label>
			    <div class="layui-input-inline" id="sexes">
			      <input type="radio" name="sex" value="1" title="男" checked="">
			      <input type="radio" name="sex" value="0" title="女">
			    </div>
		    </div>
		    
		    <div class="layui-inline">
				<label class="layui-form-label">爱好</label>
				<div class="layui-input-block" id="hobbys" style="width: 200px;">
			      <input type="checkbox" name="hobby" title="足球" value="足球">
			      <input type="checkbox" name="hobby" title="篮球" value="篮球">
			      <input type="checkbox" name="hobby" title="跑步" value="跑步">
			      <input type="checkbox" name="hobby" title="游泳" value="游泳">
			      <input type="checkbox" name="hobby" title="看书" value="看书">
			      <input type="checkbox" name="hobby" title="跳舞" value="跳舞">
			    </div>
		    </div>
		    
		    <div class="layui-inline">
				<label class="layui-form-label">生日</label>
			    <div class="layui-input-inline">
			        <input type="text" name="birthday" id="birthday" lay-verify="required" autocomplete="off" class="layui-input">
			    </div>
		    </div>
		    
		    <div class="layui-inline">
				<label class="layui-form-label">手机</label>
			    <div class="layui-input-inline">
			        <input type="text" name="phone" id="phone" lay-verify="required|phone" autocomplete="off" class="layui-input">
			    </div>
		    </div>
		    
	        <div class="layui-inline">
			      <label class="layui-form-label">用户类型</label>
			      <div class="layui-input-inline">
				      <select name="usertype.utid" id="usertype" lay-verify="required">
				        <option value="" id="usertypedef" selected="selected">--请选择类型--</option>
				        <option value="101,会员用户">会员用户</option>
				        <option value="102,普通用户">普通用户</option>
				      </select>
				  </div>
	    	</div>
	    	
		    <div class="layui-inline">
				<div class="layui-input-inline">
			      <button class="layui-btn" id="btn" lay-submit="" lay-filter="btn">立即提交</button>
			      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
		    	</div>
		    </div>
		    
	    </div>
	    </form>
	</div>
	
	<!-- 模糊查询 -->
    <div class="layui-input-inline">
    	<input type="text" id="queryByuname" placeholder="请输入查找内容" autocomplete="off" class="layui-input" style="display: inline-block; width: 250px;">
    	<button id="btnlike" class="layui-btn" style="margin-left: 10px;"><i class="layui-icon">&#xe615;</i>搜索</button>
    </div>
	
	<!-- 根据用户类型分页查询,动态选项卡 -->
	<div class="layui-tab" lay-filter="usertypeTab">
	   <ul class="layui-tab-title" id="userMeau">
	      <li class="layui-this">全部用户</li>
	      <li>会员用户</li>
	      <li>普通用户</li>
	      <li>管理员</li>
	   </ul>
	</div>
	
	<table id="demo" lay-filter="test"></table>
	
	<!-- 性别 -->
	<script type="text/html" id="Templetsex">
	{{#  if(d.sex == 1){ }}
  		<input type="checkbox" checked="checked" name="sex" value="{{d.uid}},{{d.uname}}" lay-skin="switch" lay-text="男|女" lay-filter="sexDemo" {{ d.id == 10003 ? 'checked' : '' }}>
   	{{#  } else { }}
        <input type="checkbox" name="sex" value="{{d.uid}},{{d.uname}}" lay-skin="switch" lay-text="男|女" lay-filter="sexDemo" {{ d.id == 10003 ? 'checked' : '' }}>
    {{#  } }}
    </script>
	
	<script type="text/html" id="barDemo">
  		<a class="layui-btn layui-btn-xs" lay-event="edit"><i class="layui-icon">&#xe642;</i>编辑</a>
  		<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" id="delete"><i class="layui-icon">&#xe640;</i>删除</a>
	</script>
	
	<script src="js/back/user.js"></script>	
</body>
</html>